package echat.future.cn.echat.home.bean;

import com.zhusx.core.interfaces.IHttpResult;

/**
 * Author       zhusx
 * Email        327270607@qq.com
 * Created      2017/3/13 18:06
 */

public class JSONResult<M> implements IHttpResult<M> {
    public int code = -1;
    public String msg;
    public M data;

    @Override
    public boolean isSuccess() {
        return code == 1;
    }

    @Override
    public M getData() {
        return data;
    }

    @Override
    public String getMessage() {
        return msg;
    }

    @Override
    public String getCode() {
        return code + "";
    }
}
